Carbon


FSMoveObject

Header: Files.h Carbon status: Supported

Moves a file or directory from one directory to another directory.

OSErr FSMoveObject (
    const FSRef *ref, 
    const FSRef *destDirectory, 
    FSRef *newRef
);
ref

A pointer to the file or directory to be moved

destDirectory

A pointer to the directory into which the file or directory specified in the ref parameter will be moved.

newRef

On return, a pointer to the new FSRef for the file or directory in its

new location. This parameter is optional, and may be set to NULL.

function result

A result code. If destDirectory specifies a non-existent object, dirNFErr is returned. If destDirectory refers to a file, then errFSNotAFolder is returned. If destDirectory is on a different volume than ref, diffVolErr is returned.

AVAILABILITY

Supported in Carbon. Available in Mac OS 9, and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)